local qunxian3__baishoukaiduo_yinnailuo = fk.CreateSkill {

  name = "qunxian3__baishoukaiduo_yinnailuo",

  tags = {},

}

Fk:loadTranslationTable {
  ["qunxian3__baishoukaiduo_yinnailuo"] = "引奈落",
  [":qunxian3__baishoukaiduo_yinnailuo"] = [[出牌阶段限一次，你可对一名其他角色造成y点伤害并摸y张牌。（y为你己损失的体力值）]],
  ['#qunxian3__baishoukaiduo_yinnailuo'] = '引奈落：你可对一名其他角色造成%arg点伤害并摸%arg张牌',
  ["$qunxian3__baishoukaiduo_yinnailuo"] = "引奈落",
}

qunxian3__baishoukaiduo_yinnailuo:addEffect("active", {
  anim_type = "offensive",
  prompt = function(self, player, selected_cards, selected_targets)
    return "#qunxian3__baishoukaiduo_jiangsanshiyinnailuo:::" .. player:getLostHp()
  end,
  target_num = 1,
  target_filter = function(self, player, to_select, selected, selected_cards, card, extra_data)
    return #selected == 0 and player ~= to_select
  end,
  can_use = function(self, player)
    return player:usedSkillTimes("qunxian3__baishoukaiduo_yinnailuo", Player.HistoryPhase) == 0
        and player:getLostHp() > 0
  end,
  on_use = function(self, room, skillUseEvent)
    local player = skillUseEvent.from
    local target = skillUseEvent.tos[1]
    room:damage({
      from = player,
      to = target,
      damage = player:getLostHp(),
      skillName = "qunxian3__baishoukaiduo_yinnailuo"
    })
    player:drawCards(player:getLostHp(), "qunxian3__baishoukaiduo_yinnailuo")
  end
})


return qunxian3__baishoukaiduo_yinnailuo
